package com.xxl.job.kettle.core.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@Accessors(chain = true)
@TableName("k_repository")
//@ApiModel(value = "任务信息", description = "任务信息")
@AllArgsConstructor
@NoArgsConstructor
public class KRepository {

    private static final long serialVersionUID = 1L;

    @TableField("ID")
    private String id;

    @TableField("rep_name")
//    @ApiModelProperty("资源库名称")
    private String repName;

    @TableField("rep_type")
//    @ApiModelProperty("资源库类型: fileRep-文件, dbRep-数据库")
    private String repType;

    @TableField("rep_username")
//    @ApiModelProperty("登录用户名")
    private String repUsername;

    @TableField("rep_password")
//    @ApiModelProperty("登录密码")
    private String repPassword;

    @TableField("rep_base_path")
//    @ApiModelProperty("文件资源库路径: rep_type=fileRep生效")
    private String repBasePath;

    @TableField("db_type")
//    @ApiModelProperty("资源库数据库类型（MYSQL、ORACLE）")
    private String dbType;

    @TableField("db_access")
//    @ApiModelProperty("资源库数据库访问模式（Native, ODBC, OCI, Plugin, JNDI)")
    private String dbAccess;

    @TableField("db_host")
//    @ApiModelProperty("资源库数据库主机名或者IP地址")
    private String dbHost;

    @TableField("db_port")
//    @ApiModelProperty("资源库数据库端口号")
    private String dbPort;

    @TableField("db_name")
//    @ApiModelProperty("资源库数据库名称")
    private String dbName;

    @TableField("db_username")
//    @ApiModelProperty("数据库登录账号")
    private String dbUsername;

    @TableField("db_password")
//    @ApiModelProperty("数据库登录密码")
    private String dbPassword;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("add_time")
    private Date addTime;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("add_user")
    private String addUser;

    @TableField("edit_time")
    private Date editTime;

    @TableField("edit_user")
    private String editUser;

    @TableField("del_flag")
    private String delFlag;

    /**
     * 资源库url
     */
    @TableField(exist = false)
    private String url;
}
